<!DOCTYPE html>
<html>
<head>
<meta   charset="UTF-8"> 
<title>后台管理</title>
<link href="../css/login1.css" rel="stylesheet" type="text/css" />
    <script src="../js/jquery-1.8.3.min.js"></script>
    <script type="text/javascript">
        function  login(){
            $.post("login/login",$("#formId").serialize(),function(res){
                if(res.code==200){
                    console.log(res.data)
                    alert("登录成功")
                     window.sessionStorage.setItem("account",res.data.account);
                     window.sessionStorage.setItem("id",res.data.id);
                    window.sessionStorage.setItem("type",res.data.type);
                    var newFileName = window.sessionStorage.setItem("newFileName",res.data.newFileName);
                    location.replace("success.html");
                }else {
                    alert(res.msg)
                }
            },"json");
        }
    </script>
</head>

<body>
<div class="login_box">
      <div class="login_l_img"><img src="../images/login-img.png" /></div>
      <div class="login">
          <div class="login_logo"><a href="#"><img src="../images/login_logo.png" /></a></div>
          <div class="login_name">
               <p>后台管理系统</p>
          </div>
          <form  id="formId">
              <input name="account" type="text" >
              <input name="password" type="text">
              <input value="登录" style="width:100%;" type="button" onclick="login()">
          </form>
      </div>
      <div class="copyright">某某有限公司 版权所有©2016-2018 技术支持电话：000-00000000</div>
</div>
</body>
</html>
